package com.UI;

import com.UI.R;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Spinner;
import android.widget.AdapterView.OnItemSelectedListener;

public class Hole1 extends Activity {	
	
	String par;
	
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.holes);
               
        // Par Spinner
		Spinner parSpinner = (Spinner) findViewById(R.id.widget34);
		ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this, R.array.parArray, android.R.layout.simple_spinner_item);
		adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
		parSpinner.setAdapter(adapter);  
		// Set up a call back for the spinner
		parSpinner.setOnItemSelectedListener(new OnItemSelectedListener() {
			public void onNothingSelected(AdapterView<?> arg0) {
				// Do nothing.
			}
			public void onItemSelected(AdapterView<?> parent, View v, int position, long id) {
				final Spinner selectedEvent = (Spinner) findViewById(R.id.widget34);
				par = selectedEvent.getSelectedItem().toString();				
			}
		});
		
		
		
    } // end onCreate
    
}